class Solution
{
public:
    void moveZeroes(vector<int>& nums)
    {
        int i = 0;
        for (auto e : nums)
        {
            if (e == 0) continue;
            else nums[i++] = e;
        }

        for (i; i < nums.size(); i++) nums[i] = 0;
    }
};